<extend name="Public/base"/>
<!-- 子导航 -->



<block name="body">
	<!-- 标题 -->
	<div class="main-title">
		<h2>
	    尾部管理
		</h2>
	</div>

	<!-- 按钮工具栏 -->
		<div class="cf">
		<div class="fl">
            <a class="btn" href="{:U('Site/addnews')}">新 增</a>
           
        </div>

        <!-- 高级搜索 -->
		
	</div>
	 <div style="margin-top:15px">
        	<a class="btn" href="{:U("Site/category",array("id"=>1))}">友情链接</a>
        	<a class="btn" href="{:U("Site/category",array("id"=>2))}">关于我们</a>
        	<a class="btn" href="{:U("Site/category",array("id"=>3))}">安全条例</a>
        	<a class="btn" href="{:U("Site/category",array("id"=>4))}">版权申明</a>
        	<a class="btn" href="{:U("Site/category",array("id"=>5))}">诚征英才</a>
        	<a class="btn" href="{:U("Site/category",array("id"=>6))}">帮助中心</a>
        </div>
<div>
	
</div>

	<!-- 数据表格 -->
    <div class="data-table">
		<table class="">
    <thead>
        <tr>
		<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
		<th class="">编号</th>
		<th class="">标题名称</th>
		<th class="">文章分类</th>
		<th class="">最后操作时间</th>
		<th class="">操作账户</th>
		<th class="">操作</th>
		</tr>
    </thead>
    <tbody>
		<foreach name="arr" item="vo">
		<tr>
            <td><input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" /></td>
			<td>{$vo.id} </td>
			<td><a href="{:U("Site/newscheck",array("id"=>$vo['id']))}">{$vo.title}</a></td>
<?php
		switch ($vo['category'])
		{
		case 1:
		  $category="友情链接";
		  break;
		case 2:
		   $category="关于我们";
		  break;
		case 3:
		  $category="安全条款";
		  break;
		case 4:
		  $category="版本申明";
		  break;
		case 5:
		   $category="诚征英才";
		  break;
		case 6:
		  $category="帮助中心";
		  break;
		}
			?>
			<td>{$category}</td>
			<td>{:date('Y-m-d H:i:s',$vo['pubtime'])}</td>
			<td>{$vo.username}</td>
			<td><a href="{:U("Site/newsupload",array("id"=>$vo['id']))}">编辑</a>
				<a href="{:U("Site/newsdelete",array("id"=>$vo['id']))}">删除</a>
                </td>
		</tr>
		</foreach>
	</tbody>
    </table> 

        
	</div>

	<!-- 分页 -->
    <div class="page">
       {$page}
    </div>
</div>

</block>
